<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">


            <title>Database Schema - JIRA 4.0 Beta - Atlassian Documentation - Confluence</title>
    
        

                        
    
    
            
<meta id="confluence-context-path" name="confluence-context-path" content="">
<meta id="atlassian-token" name="atlassian-token" content="KYdz9NKMUQ">
<meta id="confluence-space-key" name="confluence-space-key" content="JIRA">

<script type="text/javascript">
    // Deprecated global variables. To be removed in a future version of Confluence.
    var contextPath = '';
    var i18n = [];
</script>

    

<!-- include system resources -->
<link type="text/css" rel="stylesheet" href="Database+Schema_files/confluence_007.css" media="all">
<!--[if IE]>
<link type="text/css" rel="stylesheet" href="/s/1633/13/1.0/_/download/batch/confluence.web.resources:master-styles/confluence.web.resources:master-styles.css?ieonly=true" media="all"/>
<![endif]-->
<script type="text/javascript" src="Database+Schema_files/com_004.js"></script>
<script type="text/javascript" src="Database+Schema_files/com_006.js"></script>
<script type="text/javascript" src="Database+Schema_files/com_002.js"></script>
<link type="text/css" rel="stylesheet" href="Database+Schema_files/confluence_004.css" media="all">
<link type="text/css" rel="stylesheet" href="Database+Schema_files/confluence_009.css" media="all">
<!--[if IE]>
<link type="text/css" rel="stylesheet" href="/s/1633/13/1.0/_/download/batch/confluence.macros.profile:profile-macro-styles/confluence.macros.profile:profile-macro-styles.css?ieonly=true" media="all"/>
<![endif]-->
<script type="text/javascript" src="Database+Schema_files/confluence_014.js"></script>
<link type="text/css" rel="stylesheet" href="Database+Schema_files/confluence_002.css" media="all">
<script type="text/javascript" src="Database+Schema_files/com_007.js"></script>
<script type="text/javascript" src="Database+Schema_files/confluence_013.js"></script>
<script type="text/javascript" src="Database+Schema_files/com_003.js"></script>
<script type="text/javascript" src="Database+Schema_files/confluence_006.js"></script>
<script type="text/javascript" src="Database+Schema_files/confluence_009.js"></script>
<script type="text/javascript" src="Database+Schema_files/engine.js"></script>
<script type="text/javascript" src="Database+Schema_files/util.js"></script>
<script type="text/javascript" src="Database+Schema_files/AddLabeltoEntity.js"></script>
<script type="text/javascript" src="Database+Schema_files/RemoveLabelFromEntity.js"></script>
<script type="text/javascript" src="Database+Schema_files/SuggestedLabelsForEntity.js"></script>
<script type="text/javascript" src="Database+Schema_files/GenerateAutocompleteLabelsListForEntity.js"></script>
<script type="text/javascript" src="Database+Schema_files/confluence_003.js"></script>
<link type="text/css" rel="stylesheet" href="Database+Schema_files/confluence_006.css" media="all">
<script type="text/javascript" src="Database+Schema_files/confluence_007.js"></script>
<script type="text/javascript" src="Database+Schema_files/confluence_002.js"></script>
<link type="text/css" rel="stylesheet" href="Database+Schema_files/confluence_005.css" media="all">
<!--[if IE]>
<link type="text/css" rel="stylesheet" href="/s/1633/13/1.0/_/download/batch/confluence.web.resources:comments/confluence.web.resources:comments.css?ieonly=true" media="all"/>
<![endif]-->
<script type="text/javascript" src="Database+Schema_files/confluence_010.js"></script>
<link type="text/css" rel="stylesheet" href="Database+Schema_files/confluence_008.css" media="print">
<script type="text/javascript" src="Database+Schema_files/confluence_005.js"></script>
<script type="text/javascript" src="Database+Schema_files/com_005.js"></script>
<link type="text/css" rel="stylesheet" href="Database+Schema_files/com_002.css" media="all">
<!--[if IE]>
<link type="text/css" rel="stylesheet" href="/s/1633/13/1.0.2/_/download/batch/com.atlassian.auiplugin:dialog/com.atlassian.auiplugin:dialog.css?ieonly=true" media="all"/>
<![endif]-->
<script type="text/javascript" src="Database+Schema_files/confluence_008.js"></script>
<link type="text/css" rel="stylesheet" href="Database+Schema_files/confluence_003.css" media="all">
<script type="text/javascript" src="Database+Schema_files/confluence_004.js"></script>
<script type="text/javascript" src="Database+Schema_files/PageNotification.js"></script>
<script type="text/javascript" src="Database+Schema_files/confluence_012.js"></script>
<link type="text/css" rel="stylesheet" href="Database+Schema_files/confluence_010.css" media="all">
<script type="text/javascript" src="Database+Schema_files/confluence.js"></script>
<link type="text/css" rel="stylesheet" href="Database+Schema_files/confluence.css" media="all">
<!--[if IE]>
<link type="text/css" rel="stylesheet" href="/s/1633/13/1.0/_/download/batch/confluence.web.resources:userlink/confluence.web.resources:userlink.css?ieonly=true" media="all"/>
<![endif]-->
<script type="text/javascript" src="Database+Schema_files/com.js"></script>
<link type="text/css" rel="stylesheet" href="Database+Schema_files/com.css" media="all">
<script type="text/javascript" src="Database+Schema_files/confluence_011.js"></script>

<!-- end system resources -->

    <link rel="stylesheet" href="Database+Schema_files/combined.css" type="text/css">

    <meta name="confluence-request-time" content="1252215163279">

    <link rel="shortcut icon" href="http://confluence.atlassian.com/favicon.ico">
    <link rel="icon" type="image/png" href="http://confluence.atlassian.com/s/1633/13/_/images/logo/confluence_16.png">

<link rel="search" type="application/opensearchdescription+xml" href="http://confluence.atlassian.com/opensearch/osd.action" title="Atlassian Documentation - Confluence">

    
</head><body onload="placeFocus()" id="com-atlassian-confluence">
<!--
<div class="warningMessage">This server will be restarted at <strong>1.30pm</strong> Sydney time on <strong>July 2nd</strong>.</div>
-->


<fieldset class="hidden parameters">
    <input id="statusDialogHeading" value="What are you working on?" type="hidden">
    <input id="statusDialogLatestLabel" value="Last update:" type="hidden">
    <input id="statusDialogUpdateButtonLabel" value="Update" type="hidden">
    <input id="statusDialogCancelButtonLabel" value="Cancel" type="hidden">
</fieldset>

    
<div id="header">
        <form id="quick-search" class="quick-search" method="get" action="/dosearchsite.action">
                <fieldset>
            <legend>Quick Search</legend>
            <input class="quick-search-query placeholded" id="quick-search-query" accesskey="q" autocomplete="off" name="queryString" size="25" type="text">
            <input class="quick-search-submit" id="quick-search-submit" value="Search" type="submit">
        </fieldset>
        <fieldset class="hidden parameters">
            <input class="quickSearchPlaceholder" id="quickSearchPlaceholder" value="Search" type="hidden">

            <input id="quickNavEnabled" value="true" type="hidden">
             <!-- Quick nav disabled. SettingsManager could not be found -->         </fieldset>
    </form>
    <ul id="header-menu-bar" class="ajs-menu-bar">
                    
        
            <li class="normal ajs-menu-item">
        <a id="browse-menu-link" class="browse trigger ajs-menu-title" href="#"><span><span>Browse</span></span></a>         <div style="" class="ajs-drop-down hidden">
                        <ul id="browse-menu-link-leading" class="section-leading first">
                                        <li>
    
    <a id="space-pages-link" href="http://confluence.atlassian.com/pages/listpages.action?key=JIRA" class="">
                   <span>Pages</span>            </a>
</li>
                                        <li>
    
    <a id="space-blogposts-link" href="http://confluence.atlassian.com/pages/viewrecentblogposts.action?key=JIRA" class="">
                   <span>News</span>            </a>
</li>
                                        <li>
    
    <a id="space-labels-link" href="http://confluence.atlassian.com/labels/listlabels-heatmap.action?key=JIRA" class="">
                   <span>Labels</span>            </a>
</li>
                                        <li>
    
    <a id="space-attachments-link" href="http://confluence.atlassian.com/spaces/listattachmentsforspace.action?key=JIRA" class="">
                   <span>Attachments</span>            </a>
</li>
                                        <li>
    
    <a href="http://confluence.atlassian.com/spaces/space-bookmarks.action?spaceKey=JIRA" class="">
                   <span>Bookmarks</span>            </a>
</li>
                                        <li>
    
    <a id="space-mail-link" href="http://confluence.atlassian.com/spaces/viewmailarchive.action?key=JIRA" class="">
                   <span>Mail</span>            </a>
</li>
                                        <li>
    
    <a id="space-advanced-link" href="http://confluence.atlassian.com/spaces/viewspacesummary.action?key=JIRA" class="">
                   <span>Advanced</span>            </a>
</li>
                            </ul>
                        <ul id="browse-menu-link-global" class="section-global">
                                        <li>
    
    <a id="people-directory-link" href="http://confluence.atlassian.com/peopledirectory.action" class="">
                   <span>People Directory</span>            </a>
</li>
                            </ul>
                    </div>
    </li>
        
                                                         <li class="ajs-menu-item normal">
    
    <a id="login-link" href="http://confluence.atlassian.com/login.action?os_destination=%2Fdisplay%2FJIRA%2FDatabase%2BSchema" class="user-item login-link">
                   <span>Log In</span>            </a>
</li>
                            <li class="ajs-menu-item normal">
    
    <a id="signup-link" href="http://confluence.atlassian.com/signup.action" class="user-item signup-link">
                   <span>Sign Up</span>            </a>
</li>
                            </ul>
    
    
    <ol id="breadcrumbs">
                    
        <li class="first"><span>
                                    <a href="http://confluence.atlassian.com/dashboard.action">Dashboard</a>
                </span></li>
                    
        <li><span>
                                    <a href="http://confluence.atlassian.com/display/JIRA">JIRA 4.0 Beta</a>
                </span></li>
                                        <li id="ellipsis" title="    …
                    Home
             &gt;         JIRA Development Hub
        …"><span><strong>…</strong></span></li>
                                    
        <li class="hidden-crumb"><span>
                                    <a href="http://confluence.atlassian.com/display/JIRA/Home">Home</a>
                </span></li>
                                
        <li class="hidden-crumb"><span>
                                    <a href="http://confluence.atlassian.com/display/JIRA/JIRA+Development+Hub">JIRA Development Hub</a>
                </span></li>
                    
        <li><span>
                                    <a href="http://confluence.atlassian.com/display/JIRA/Understanding+how+JIRA+works">Understanding how JIRA works</a>
                </span></li>
                    
        <li><span>
                                    Database Schema
                </span></li>
        </ol>

</div>
<div id="main">
    
                <ul id="user-control-panel">
                                
            <li class="first"><a href="http://confluence.atlassian.com/login.action?os_destination=%2Fdisplay%2FJIRA%2FDatabase%2BSchema">Log In</a></li>

                                            <li><a href="http://confluence.atlassian.com/signup.action">Sign Up</a></li>
                                            </ul>
        
    <div id="navigation" class="content-navigation view">
        <fieldset class="hidden parameters">
            <input id="pageId" value="122037" type="hidden">
        </fieldset>
        <ul class="ajs-menu-bar">
                                
            <li class="normal ajs-menu-item">
        <a id="add-menu-link" class="add trigger ajs-menu-title" href="#"><span><span>Add</span></span></a>         <div style="" class="ajs-drop-down hidden">
                        <ul id="add-menu-link-page" class="section-page first">
                                        <li>
    
    <a id="add-comment-menu-link" href="http://confluence.atlassian.com/display/JIRA/Database+Schema?showComments=true&amp;showCommentArea=true#addcomment" class="add-comment">
                   <span>Comment</span>            </a>
</li>
                            </ul>
                    </div>
    </li>
                    
            <li class="normal ajs-menu-item">
        <a id="action-menu-link" class="action trigger ajs-menu-title" href="#"><span><span>Tools</span></span></a>         <div style="" class="ajs-drop-down most-right-menu-item hidden">
                        <ul id="action-menu-link-primary" class="section-primary first">
                                        <li>
    
    <a id="view-attachments-link" href="http://confluence.atlassian.com/pages/viewpageattachments.action?pageId=122037" class="action-view-attachments" accesskey="a">
                   <span><u>A</u>ttachments (0)</span>            </a>
</li>
                                        <li>
    
    <a id="action-view-history-link" href="http://confluence.atlassian.com/pages/viewpreviousversions.action?pageId=122037" class="action-view-history">
                   <span>Page History</span>            </a>
</li>
                            </ul>
                        <ul id="action-menu-link-secondary" class="section-secondary">
                                        <li>
    
    <a id="view-page-info-link" href="http://confluence.atlassian.com/pages/viewinfo.action?pageId=122037" class="action-view-info" accesskey="i">
                   <span><u>I</u>nfo</span>            </a>
</li>
                                        <li>
    
    <a id="action-view-source-link" href="http://confluence.atlassian.com/pages/viewpagesrc.action?pageId=122037" class="action-view-source popup-link">
                   <span>View Wiki Markup</span>            </a>
</li>
                                        <li>
    
    <a href="http://confluence.atlassian.com/spaces/flyingpdf/pdfpageexport.action?pageId=122037&amp;atl_token=KYdz9NKMUQ" class="">
                   <span>Export to PDF</span>            </a>
</li>
                                        <li>
    
    <a id="action-export-word-link" href="http://confluence.atlassian.com/exportword?pageId=122037" class="action-export-word">
                   <span>Export to Word</span>            </a>
</li>
                            </ul>
                    </div>
    </li>
            </ul>
    </div>

    
    <h1 id="title-heading" class="pagetitle">
                    <a href="http://confluence.atlassian.com/display/JIRA"><img class="logo global" src="Database+Schema_files/confluence_48_white.png" alt=""></a>        
		<span id="title-text">
					            <a href="http://confluence.atlassian.com/display/JIRA/Database+Schema">Database Schema</a>
    				</span>
    </h1>

    

    
    
    
    <!--
    Root decorator: this is a layer of abstraction that Confluence doesn't need. It will be removed eventually.
-->




    
    

    
    
        
    
    
                    
    

    


<div id="content" class="page view">
    
        
    
            
                            
    

                    

        
        <div class="page-metadata">
    <ul>
                <li class="page-metadata-modification-info">
                    Added by <a title="" class="confluence-userlink username:anton@atlassian.com url fn userlink-0" href="http://confluence.atlassian.com/display/%7Eanton@atlassian.com">Anton Mazkovoi</a>, last edited by <a title="" class="confluence-userlink username:rosie@atlassian.com url fn userlink-1" href="http://confluence.atlassian.com/display/%7Erosie@atlassian.com">Rosie Jameson [Atlassian Technical Writer]</a> on Jul 23, 2009
                                        <span class="noprint">&nbsp;(<a href="http://confluence.atlassian.com/pages/diffpages.action?pageId=122037&amp;originalId=198246590">view change</a>)</span>
                            </li>
            </ul>
      <div id="versionComment" class="noteMacro" style="padding: 5px; display: none;">
      <strong>Comment:</strong>
      <br>
  </div>

    <script>
      var show = document.getElementById('show');
      var hide = document.getElementById('hide');
      var versionComment = document.getElementById('versionComment');

      function showComment(){
        show.style.display = 'none';
        hide.style.display = 'inline';
        versionComment.style.display = 'block';
      }

      function hideComment(){
        show.style.display = 'inline';
        hide.style.display = 'none';
        versionComment.style.display = 'none';
      }

    </script>
</div>        
<style>
.spacetree * ul{
padding-left:0px;
margin-left: 0px;
}
.spacetree * li{
margin-left: 5px;
padding-left:5px;
}

</style>

<table cellpadding="5" cellspacing="2">
<tbody><tr>
<td class="noprint" align="left" bgcolor="#eeecec" valign="top" width="30%">
<div class="tabletitle">All Versions</div>
<div class="spacetree">
                                        <p><script>
function ExpandMacroToggleAnswer(id) {
    var answer = document.getElementById("answer-" + id);
    var icon = document.getElementById("icon-" + id);
    ExpandMacroToggle(answer);
    if (answer.style.display == 'none') {
        icon.src="/images/icons/arrow_closed_active_16.gif";
    }
    else {
        icon.src="/images/icons/arrow_open_active_16.gif";
    }
}
function ExpandMacroToggle(el) {
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
	}
	else {
		el.style.display = '';
	}
}
// preload open image (variable not used elsewhere)
openIcon = new Image();
openIcon.src = "/images/icons/arrow_open_active_16.gif";
</script>
<a name="TreeNavigationVersions-Clickforallversions">
</a></p><div style="cursor: pointer;" onclick="ExpandMacroToggleAnswer('1169281880')"><a name="TreeNavigationVersions-Clickforallversions"><img id="icon-1169281880" src="Database+Schema_files/arrow_closed_active_16.gif" style="vertical-align: middle;"> <expand-title style="vertical-align: middle;">Click for all versions</expand-title></a></div>
<div id="answer-1169281880" class="toggle-answer" style="display: none;"><!--$body--><a name="TreeNavigationVersions-Clickforallversions"><br>
</a><a href="http://confluence.atlassian.com/display/JIRA" class="external-link" rel="nofollow">JIRA 4.0 Beta Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v3.13" class="external-link" rel="nofollow">JIRA 3.13 Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v3.12" class="external-link" rel="nofollow">JIRA 3.12 Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v3.11" class="external-link" rel="nofollow">JIRA 3.11 Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v3.10" class="external-link" rel="nofollow">JIRA 3.10 Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v3.9" class="external-link" rel="nofollow">JIRA 3.9 Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v3.8" class="external-link" rel="nofollow">JIRA 3.8 Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v3.7" class="external-link" rel="nofollow">JIRA 3.7 Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v3.6" class="external-link" rel="nofollow">JIRA 3.6 Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v3.5" class="external-link" rel="nofollow">JIRA 3.5 Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v3.4.1" class="external-link" rel="nofollow">JIRA 3.4.1 Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v3.3" class="external-link" rel="nofollow">JIRA 3.3 Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v3.2" class="external-link" rel="nofollow">JIRA 3.2 Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v3.1" class="external-link" rel="nofollow">JIRA 3.1 Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v2.6" class="external-link" rel="nofollow">JIRA 2.6 Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v2.5.1" class="external-link" rel="nofollow">JIRA 2.5.1 Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v2.4.1" class="external-link" rel="nofollow">JIRA 2.4.1 Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v2.3" class="external-link" rel="nofollow">JIRA 2.3 Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v2.2" class="external-link" rel="nofollow">JIRA 2.2 Documentation</a><br>
<a href="http://www.atlassian.com/software/jira/docs/v2.1" class="external-link" rel="nofollow">JIRA 2.1 Documentation</a></div>

                        </div>
<div class="tabletitle">JIRA 4.0 Beta Documentation</div>
<div class="spacetree">
                                        <div id="pagetreesearch">


<form method="post" action="http://confluence.atlassian.com/plugins/pagetreesearch/pagetreesearch.action" name="pagetreesearchform">
	<input name="ancestorId" value="1556" type="hidden">
	<input name="spaceKey" value="JIRA" type="hidden">
    <input size="20" name="queryString" type="text">
	<input value="Search" type="submit">
</form>

</div>
    

    
    

<div class="plugin_pagetree">

        
        
    <ul style="list-style-type: none; margin-left: 0pt; padding-left: 0pt;">
        <div id="children1556-0" class="plugin_pagetree_children">
<ul style="list-style-type: none;" id="child_ul1556-0">
            <li>            <img src="Database+Schema_files/tree_square.gif" border="0">
                <span id="childrenspan181536938-0">                 <img src="Database+Schema_files/docs_16.gif" title="JIRA 101" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/JIRA+101">JIRA 101</a>
        </span>        <div id="children181536938-0">
                    <ul style="list-style-type: none;" id="child_ul181536938-0"></ul>
            </div>
    </li>
            <li>            <a class="plugin_pagetree_childtoggle" href="#">
                    <img id="plusminus100303115-0" src="Database+Schema_files/tree_plus.gif" border="0"></a>
                        <span id="childrenspan100303115-0">                 <img src="Database+Schema_files/docs_16.gif" title="JIRA User's Guide" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/JIRA+User%27s+Guide">JIRA User's Guide</a>
        </span>        <div id="children100303115-0">
                                                            </div>
    </li>
            <li>            <a class="plugin_pagetree_childtoggle" href="#">
                    <img id="plusminus100303111-0" src="Database+Schema_files/tree_plus.gif" border="0"></a>
                        <span id="childrenspan100303111-0">                 <img src="Database+Schema_files/docs_16.gif" title="JIRA Administrator's Guide" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/JIRA+Administrator%27s+Guide">JIRA Administrator's Guide</a>
        </span>        <div id="children100303111-0">
                                                            </div>
    </li>
            <li>            <a class="plugin_pagetree_childtoggle" href="#">
                    <img id="plusminus11515-0" src="Database+Schema_files/tree_plus.gif" border="0"></a>
                        <span id="childrenspan11515-0">                 <img src="Database+Schema_files/docs_16.gif" title="JIRA Administrators FAQ" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/JIRA+Administrators+FAQ">JIRA Administrators FAQ</a>
        </span>        <div id="children11515-0">
                                                            </div>
    </li>
            <li>            <a class="plugin_pagetree_childtoggle" href="#">
                    <img id="plusminus100303124-0" src="Database+Schema_files/tree_plus.gif" border="0"></a>
                        <span id="childrenspan100303124-0">                 <img src="Database+Schema_files/docs_16.gif" title="JIRA Installation and Upgrade Guide" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/JIRA+Installation+and+Upgrade+Guide">JIRA Installation and Upgrade Guide</a>
        </span>        <div id="children100303124-0">
                                                            </div>
    </li>
            <li>            <a class="plugin_pagetree_childtoggle" href="#">
                    <img id="plusminus11514-0" src="Database+Schema_files/tree_minus.gif" border="0"></a>
                        <span id="childrenspan11514-0">                 <img src="Database+Schema_files/docs_16.gif" title="JIRA Development Hub" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/JIRA+Development+Hub">JIRA Development Hub</a>
        </span>        <div id="children11514-0">
                                                        <ul style="list-style-type: none;" id="child_ul11514-0">
                                            <li>            <a class="plugin_pagetree_childtoggle" href="#">
                    <img id="plusminus7971-0" src="Database+Schema_files/tree_plus.gif" border="0"></a>
                        <span id="childrenspan7971-0">                 <img src="Database+Schema_files/docs_16.gif" title="JIRA Plugin Guide" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/JIRA+Plugin+Guide">JIRA Plugin Guide</a>
        </span>        <div id="children7971-0">
                                                            </div>
    </li>
                                            <li>            <a class="plugin_pagetree_childtoggle" href="#">
                    <img id="plusminus133062-0" src="Database+Schema_files/tree_minus.gif" border="0"></a>
                        <span id="childrenspan133062-0">                 <img src="Database+Schema_files/docs_16.gif" title="Understanding how JIRA works" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/Understanding+how+JIRA+works">Understanding how JIRA works</a>
        </span>        <div id="children133062-0">
                                                        <ul style="list-style-type: none;" id="child_ul133062-0">
                                            <li>            <img src="Database+Schema_files/tree_square.gif" border="0">
                <span id="childrenspan9038-0">                 <img src="Database+Schema_files/docs_16.gif" title="Customising JIRA code" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/Customising+JIRA+code">Customising JIRA code</a>
        </span>        <div id="children9038-0">
                    <ul style="list-style-type: none;" id="child_ul9038-0"></ul>
            </div>
    </li>
                                            <li>            <a class="plugin_pagetree_childtoggle" href="#">
                    <img id="plusminus122037-0" src="Database+Schema_files/tree_plus.gif" border="0"></a>
                        <span style="font-weight: bold;" id="childrenspan122037-0">                 <img src="Database+Schema_files/docs_16.gif" title="Database Schema" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/Database+Schema">Database Schema</a>
        </span>        <div id="children122037-0">
                                                            </div>
    </li>
                                            <li>            <a class="plugin_pagetree_childtoggle" href="#">
                    <img id="plusminus8585622-0" src="Database+Schema_files/tree_plus.gif" border="0"></a>
                        <span id="childrenspan8585622-0">                 <img src="Database+Schema_files/docs_16.gif" title="JIRA Architectural Overview" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/JIRA+Architectural+Overview">JIRA Architectural Overview</a>
        </span>        <div id="children8585622-0">
                                                            </div>
    </li>
                                            <li>            <a class="plugin_pagetree_childtoggle" href="#">
                    <img id="plusminus133234-0" src="Database+Schema_files/tree_plus.gif" border="0"></a>
                        <span id="childrenspan133234-0">                 <img src="Database+Schema_files/docs_16.gif" title="PicoContainer and JIRA" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/PicoContainer+and+JIRA">PicoContainer and JIRA</a>
        </span>        <div id="children133234-0">
                                                            </div>
    </li>
                                            <li>            <a class="plugin_pagetree_childtoggle" href="#">
                    <img id="plusminus193329-0" src="Database+Schema_files/tree_plus.gif" border="0"></a>
                        <span id="childrenspan193329-0">                 <img src="Database+Schema_files/docs_16.gif" title="Sample Code" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/Sample+Code">Sample Code</a>
        </span>        <div id="children193329-0">
                                                            </div>
    </li>
                                        </ul>
                                        </div>
    </li>
                                            <li>            <a class="plugin_pagetree_childtoggle" href="#">
                    <img id="plusminus133078-0" src="Database+Schema_files/tree_plus.gif" border="0"></a>
                        <span id="childrenspan133078-0">                 <img src="Database+Schema_files/docs_16.gif" title="Developer Tutorials" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/Developer+Tutorials">Developer Tutorials</a>
        </span>        <div id="children133078-0">
                                                            </div>
    </li>
                                            <li>            <a class="plugin_pagetree_childtoggle" href="#">
                    <img id="plusminus134644-0" src="Database+Schema_files/tree_plus.gif" border="0"></a>
                        <span id="childrenspan134644-0">                 <img src="Database+Schema_files/docs_16.gif" title="JIRA Developer FAQ" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/JIRA+Developer+FAQ">JIRA Developer FAQ</a>
        </span>        <div id="children134644-0">
                                                            </div>
    </li>
                                            <li>            <img src="Database+Schema_files/tree_square.gif" border="0">
                <span id="childrenspan113705340-0">                 <img src="Database+Schema_files/docs_16.gif" title="JIRA Developer Forums" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/JIRA+Developer+Forums">JIRA Developer Forums</a>
        </span>        <div id="children113705340-0">
                    <ul style="list-style-type: none;" id="child_ul113705340-0"></ul>
            </div>
    </li>
                                        </ul>
                                        </div>
    </li>
            <li>            <a class="plugin_pagetree_childtoggle" href="#">
                    <img id="plusminus192872750-0" src="Database+Schema_files/tree_plus.gif" border="0"></a>
                        <span id="childrenspan192872750-0">                 <img src="Database+Schema_files/docs_16.gif" title="GreenHopper for JIRA Guide" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/GreenHopper+for+JIRA+Guide">GreenHopper for JIRA Guide</a>
        </span>        <div id="children192872750-0">
                                                            </div>
    </li>
            <li>            <img src="Database+Schema_files/tree_square.gif" border="0">
                <span id="childrenspan179442081-0">                 <img src="Database+Schema_files/docs_16.gif" title="JIRA Tutorial Videos" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/JIRA+Tutorial+Videos">JIRA Tutorial Videos</a>
        </span>        <div id="children179442081-0">
                    <ul style="list-style-type: none;" id="child_ul179442081-0"></ul>
            </div>
    </li>
            <li>            <img src="Database+Schema_files/tree_square.gif" border="0">
                <span id="childrenspan185729488-0">                 <img src="Database+Schema_files/docs_16.gif" title="Local JIRA documentation" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/Local+JIRA+documentation">Local JIRA documentation</a>
        </span>        <div id="children185729488-0">
                    <ul style="list-style-type: none;" id="child_ul185729488-0"></ul>
            </div>
    </li>
    </ul>
</div>
    </ul>

    <fieldset class="hidden">
        <input name="treeId" value="" type="hidden">
        <input name="treeRequestId" value="/plugins/pagetree/naturalchildren.action?decorator=none&amp;excerpt=false&amp;sort=position&amp;reverse=false&amp;disableLinks=false" type="hidden">
        <input name="treePageId" value="122037" type="hidden">

        <input name="noRoot" value="false" type="hidden">
        <input name="rootPageId" value="1556" type="hidden">

        <input name="rootPage" value="" type="hidden">
        <input name="startDepth" value="0" type="hidden">
        <input name="spaceKey" value="JIRA" type="hidden">

        <input name="i18n-pagetree.loading" value="Loading..." type="hidden">
        <input name="loginUrl" value="/login.action?os_destination=%2Fdisplay%2FJIRA%2FDatabase%2BSchema" type="hidden">

                <fieldset class="hidden">
                                                <input name="ancestorId" value="133062" type="hidden">
                                    <input name="ancestorId" value="11514" type="hidden">
                                    <input name="ancestorId" value="1556" type="hidden">
                                    </fieldset>
    </fieldset>
</div>


<p><a href="http://confluence.atlassian.com/labels/listlabels-alphaview.action?key=JIRA" class="external-link" rel="nofollow">Index</a></p>
                        </div>
</td>
<td class="pagecontent" align="left" valign="top" width="70%">
<div class="wiki-content">
<!-- wiki content -->
            <div class="panelMacro"><table class="infoMacro"><colgroup><col width="24"><col></colgroup><tbody><tr><td valign="top"><img src="Database+Schema_files/information.gif" alt="" align="absmiddle" border="0" width="16" height="16"></td><td>Please note that JIRA 3.7 has introduced some <a href="http://confluence.atlassian.com/display/JIRA/JIRA+3.7+Database+Schema+Changes" title="JIRA 3.7 Database Schema Changes">changes</a> to the database schema.</td></tr></tbody></table></div>
<p><br class="atl-forced-newline"></p>

<p>JIRA uses Entity Engine module of the <a href="http://www.ofbiz.org/" class="external-link" rel="nofollow">OfBiz</a> suite to communicate with the database. You can learn more about the Entity Engine by reading its online <a href="http://www.ofbiz.org/docs/entity.html" class="external-link" rel="nofollow">documentation</a>.</p>

<p>The database schema is described in the <tt>entitymodel.xml</tt> found in the <tt>WEB-INF/classes/entitydefs</tt> directory under the JIRA web application. The <tt>entitymodel.xml</tt>
file has an XML definition of all JIRA's database tables, table columns
and their data type. Some of the relationships between tables also
appear in the file.</p>

<p>If you are using JIRA's API you will notice that a lot of code deals with <tt>GenericValue</tt> objects. The <tt>GenericValue</tt> is an OfBiz entity engine object. Each GenericValue object represents a record in the database.</p>

<p>To get a value of a field from a GenericValue you will need to use the relevant getter method for the field's type. For example:
<br class="atl-forced-newline"></p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">GenericValue project = ...
<span class="code-object">String</span> name = project.getString(<span class="code-quote">"name"</span>);
<span class="code-object">Long</span> id = project.getLong(<span class="code-quote">"id"</span>);
</pre>
</div></div>
<p>The list of valid fields for each entity can be obtained by looking the entity's definition in the <tt>WEB-INF/classes/entitydefs/entitymodel.xml</tt> file. For the above example, one needs to look at the "Project" entity.</p>

<h3><a name="DatabaseSchema-Relationshipsbetweentables"></a>Relationships between tables</h3>

<p>Some of the relationships between JIRA's tables in the database are documented below:</p>

<div>
<ul>
    <li><a href="#DatabaseSchema-IssueFields">Issue Fields</a></li>
<ul>
    <li><a href="#DatabaseSchema-Simplefields">Simple fields</a></li>
    <li><a href="#DatabaseSchema-Userdetails">User details</a></li>
    <li><a href="#DatabaseSchema-Componentsandversions">Components and versions</a></li>
    <li><a href="#DatabaseSchema-Issuelinks">Issue links</a></li>
</ul>
    <li><a href="#DatabaseSchema-Customfields">Custom fields</a></li>
<ul>
    <li><a href="#DatabaseSchema-Customfieldconfigurationoptions">Custom field configuration options</a></li>
    <li><a href="#DatabaseSchema-Customfieldconfigurationdefaultvalue">Custom field configuration default value</a></li>
    <li><a href="#DatabaseSchema-Customfieldconfigurationschemes">Custom field configuration schemes</a></li>
    <li><a href="#DatabaseSchema-Customfieldconfigurationscopes">Custom field configuration scopes</a></li>
</ul>
    <li><a href="#DatabaseSchema-ChangeHistory">Change History</a></li>
    <li><a href="#DatabaseSchema-UsersandGroups">Users and Groups</a></li>
    <li><a href="#DatabaseSchema-Issuestatusandworkflow">Issue status and workflow</a></li>
    <li><a href="#DatabaseSchema-Issuestatus">Issue status</a></li>
    <li><a href="#DatabaseSchema-Issueworkflowstep">Issue workflow step</a></li>
    <li><a href="#DatabaseSchema-Howstatusandsteprelate">How status and step relate</a></li>
    <li><a href="#DatabaseSchema-Summary">Summary</a></li>
<ul>
    <li><a href="#DatabaseSchema-ExampleSQLs">Example SQLs</a></li>
</ul>
</ul></div>


<h1><a name="DatabaseSchema-IssueFields"></a>Issue Fields</h1>

<p><br class="atl-forced-newline"></p>
<p>This page shows how to examine each of a JIRA issue's fields via SQL. We will use <a href="http://jira.atlassian.com/browse/JRA-5378" class="external-link" rel="nofollow">JRA-3166</a> as a sample issue in our queries.</p>

<h2><a name="DatabaseSchema-Simplefields"></a>Simple fields</h2>

<p>Most fields in JIRA are kept in the <tt>jiraissue</tt> table:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>mysql&gt; desc jiraissue;
+----------------------+---------------+------+-----+---------+-------+
| Field                | Type          | Null | Key | Default | Extra |
+----------------------+---------------+------+-----+---------+-------+
| ID                   | decimal(18,0) | NO   | PRI |         |       |
| pkey                 | varchar(255)  | YES  | MUL | NULL    |       |
| PROJECT              | decimal(18,0) | YES  | MUL | NULL    |       |
| REPORTER             | varchar(255)  | YES  |     | NULL    |       |
| ASSIGNEE             | varchar(255)  | YES  | MUL | NULL    |       |
| issuetype            | varchar(255)  | YES  |     | NULL    |       |
| SUMMARY              | varchar(255)  | YES  |     | NULL    |       |
| DESCRIPTION          | longtext      | YES  |     | NULL    |       |
| ENVIRONMENT          | longtext      | YES  |     | NULL    |       |
| PRIORITY             | varchar(255)  | YES  |     | NULL    |       |
| RESOLUTION           | varchar(255)  | YES  |     | NULL    |       |
| issuestatus          | varchar(255)  | YES  |     | NULL    |       |
| CREATED              | datetime      | YES  |     | NULL    |       |
| UPDATED              | datetime      | YES  |     | NULL    |       |
| DUEDATE              | datetime      | YES  |     | NULL    |       |
| VOTES                | decimal(18,0) | YES  |     | NULL    |       |
| TIMEORIGINALESTIMATE | decimal(18,0) | YES  |     | NULL    |       |
| TIMEESTIMATE         | decimal(18,0) | YES  |     | NULL    |       |
| TIMESPENT            | decimal(18,0) | YES  |     | NULL    |       |
| WORKFLOW_ID          | decimal(18,0) | YES  |     | NULL    |       |
| SECURITY             | decimal(18,0) | YES  |     | NULL    |       |
| FIXFOR               | decimal(18,0) | YES  |     | NULL    |       |
| COMPONENT            | decimal(18,0) | YES  |     | NULL    |       |
+----------------------+---------------+------+-----+---------+-------+
</pre>
</div></div>

<p>They can be retrieved with a regular select:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>mysql&gt; select id, pkey, project, reporter, assignee, issuetype, summary from jiraissue where pkey='JRA-3166';
+-------+----------+---------+-----------+----------+-----------+---------------------------------+
| id    | pkey     | project | reporter  | assignee | issuetype | summary                         |
+-------+----------+---------+-----------+----------+-----------+---------------------------------+
| 16550 | JRA-3166 |   10240 | mvleeuwen | NULL     | 2         | Database consistency check tool |
+-------+----------+---------+-----------+----------+-----------+---------------------------------+
</pre>
</div></div>

<h2><a name="DatabaseSchema-Userdetails"></a>User details</h2>

<p>Say we wish to find out the email address and other details about our reporter, <tt>mvleeuwen</tt>. First we find this user's ID:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>mysql&gt; select id from userbase where username='mvleeuwen';
+-------+
| id    |
+-------+
| 13841 |
+-------+
</pre>
</div></div>

<p>Then use it to look up 'properties' of this userbase record (stored in <a href="http://www.opensymphony.com/propertyset/" class="external-link" rel="nofollow">propertysets</a>. Each property has a record in the <tt>propertyentry</tt> table specifying its name and type, and a record in one of <tt>propertystring</tt>, <tt>propertydecimal</tt>, <tt>propertydate</tt>, <tt>propertytext</tt>, <tt>propertydata</tt> or <tt>propertynumber</tt>, depending on the type.</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>mysql&gt; desc propertyentry;
+--------------+---------------+------+-----+---------+-------+
| Field        | Type          | Null | Key | Default | Extra |
+--------------+---------------+------+-----+---------+-------+
| ID           | decimal(18,0) | NO   | PRI |         |       |
| ENTITY_NAME  | varchar(255)  | YES  |     | NULL    |       |
| ENTITY_ID    | decimal(18,0) | YES  | MUL | NULL    |       |
| PROPERTY_KEY | varchar(255)  | YES  |     | NULL    |       |
| propertytype | decimal(9,0)  | YES  |     | NULL    |       |
+--------------+---------------+------+-----+---------+-------+

mysql&gt; select * from propertyentry where ENTITY_NAME='OSUser' and ENTITY_ID=(select id from userbase where username='mvleeuwen');
+-------+-------------+-----------+--------------+--------------+
| ID    | ENTITY_NAME | ENTITY_ID | PROPERTY_KEY | propertytype |
+-------+-------------+-----------+--------------+--------------+
| 18352 | OSUser      |     13841 | email        |            5 |
| 18353 | OSUser      |     13841 | fullName     |            5 |
+-------+-------------+-----------+--------------+--------------+
</pre>
</div></div>

<p>So <tt>email</tt> and <tt>fullName</tt> are of type <tt>5</tt>. which means the <tt>propertystring</tt> table. Here is the list of <tt>propertytype</tt> to table mappings:</p>

<div class="table-wrap">
<table class="confluenceTable"><tbody>
<tr>
<th class="confluenceTh"> propertyentry.propertytype value </th>
<th class="confluenceTh"> Table value is stored in </th>
<th class="confluenceTh"> Used for </th>
</tr>
<tr>
<td class="confluenceTd"> 1 </td>
<td class="confluenceTd"> propertynumber </td>
<td class="confluenceTd"> Boolean values, eg. user preferences </td>
</tr>
<tr>
<td class="confluenceTd"> 5 </td>
<td class="confluenceTd"> propertystring </td>
<td class="confluenceTd"> Most fields, eg. full names, email addresses </td>
</tr>
<tr>
<td class="confluenceTd"> 6 </td>
<td class="confluenceTd"> propertytext </td>
<td class="confluenceTd"> Large blocks of text, eg. the introduction text, HTML portletconfigurations </td>
</tr>
<tr>
<td class="confluenceTd"> 2/3 <img class="emoticon" src="Database+Schema_files/help_16.gif" alt="" align="absmiddle" border="0" width="16" height="16"> </td>
<td class="confluenceTd"> propertydecimal </td>
<td class="confluenceTd"> Unused in JIRA </td>
</tr>
<tr>
<td class="confluenceTd"> 7  </td>
<td class="confluenceTd"> propertydate </td>
<td class="confluenceTd"> Unused in JIRA </td>
</tr>
<tr>
<td class="confluenceTd"> 10 </td>
<td class="confluenceTd"> propertydata </td>
<td class="confluenceTd"> Unused in JIRA </td>
</tr>
</tbody></table>
</div>


<p>So the <tt>email</tt> and <tt>fullName</tt> properties are strings, and so can be found in the <tt>propertystring</tt> table:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>mysql&gt; select * from propertystring where id in (18352, 18353);
+-------+---------------------+
| ID    | propertyvalue       |
+-------+---------------------+
| 18352 | lemval@zonnet.nl    |
| 18353 | Michael van Leeuwen |
+-------+---------------------+
</pre>
</div></div>

<h2><a name="DatabaseSchema-Componentsandversions"></a>Components and versions</h2>

<p>Since each issue can have multiple components/versions, there is a join table between <tt>jiraissue</tt> and <tt>version</tt>/<tt>component</tt> tables called <tt>nodeassociation</tt>:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>mysql&gt; desc nodeassociation;
+--------------------+---------------+------+-----+---------+-------+
| Field              | Type          | Null | Key | Default | Extra |
+--------------------+---------------+------+-----+---------+-------+
| SOURCE_NODE_ID     | decimal(18,0) | NO   | PRI |         |       |
| SOURCE_NODE_ENTITY | varchar(60)   | NO   | PRI |         |       |
| SINK_NODE_ID       | decimal(18,0) | NO   | PRI |         |       |
| SINK_NODE_ENTITY   | varchar(60)   | NO   | PRI |         |       |
| ASSOCIATION_TYPE   | varchar(60)   | NO   | PRI |         |       |
| SEQUENCE           | decimal(9,0)  | YES  |     | NULL    |       |
+--------------------+---------------+------+-----+---------+-------+

mysql&gt; select distinct SOURCE_NODE_ENTITY from nodeassociation;
+--------------------+
| SOURCE_NODE_ENTITY |
+--------------------+
| Issue              |
| Project            |
+--------------------+

mysql&gt; select distinct SINK_NODE_ENTITY from nodeassociation;
+-----------------------+
| SINK_NODE_ENTITY      |
+-----------------------+
| IssueSecurityScheme   |
| PermissionScheme      |
| IssueTypeScreenScheme |
| NotificationScheme    |
| ProjectCategory       |
| FieldLayoutScheme     |
| Component             |
| Version               |
+-----------------------+

mysql&gt; select distinct ASSOCIATION_TYPE from nodeassociation;
+------------------+
| ASSOCIATION_TYPE |
+------------------+
| IssueVersion     |
| IssueFixVersion  |
| IssueComponent   |
| ProjectScheme    |
| ProjectCategory  |
+------------------+
</pre>
</div></div>

<p>So to get fix-for versions of an issue, run:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>mysql&gt; select * from projectversion where id in (
    select SINK_NODE_ID from nodeassociation where ASSOCIATION_TYPE='IssueFixVersion' and SOURCE_NODE_ID=(
        select id from jiraissue where pkey='JRA-5351')
    );
+-------+---------+-------+-------------+----------+----------+----------+------+-------------+
| ID    | PROJECT | vname | DESCRIPTION | SEQUENCE | RELEASED | ARCHIVED | URL  | RELEASEDATE |
+-------+---------+-------+-------------+----------+----------+----------+------+-------------+
| 11614 |   10240 | 3.6   | NULL        |      131 | NULL     | NULL     | NULL | NULL        |
+-------+---------+-------+-------------+----------+----------+----------+------+-------------+

</pre>
</div></div>

<p>Similarly with affects versions:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>mysql&gt; select * from projectversion where id in (
    select SINK_NODE_ID from nodeassociation where ASSOCIATION_TYPE='IssueVersion' and SOURCE_NODE_ID=(
        select id from jiraissue where pkey='JRA-5351')
    );
+-------+---------+---------------------+-------------+----------+----------+----------+------+---------------------+
| ID    | PROJECT | vname               | DESCRIPTION | SEQUENCE | RELEASED | ARCHIVED | URL  | RELEASEDATE         |
+-------+---------+---------------------+-------------+----------+----------+----------+------+---------------------+
| 10931 |   10240 |  3.0.3 Professional | NULL        |       73 | true     | NULL     | NULL | 2004-11-19 00:00:00 |
| 10930 |   10240 |  3.0.3 Standard     | NULL        |       72 | true     | NULL     | NULL | 2004-11-19 00:00:00 |
| 10932 |   10240 |  3.0.3 Enterprise   | NULL        |       74 | true     | NULL     | NULL | 2004-11-19 00:00:00 |
+-------+---------+---------------------+-------------+----------+----------+----------+------+---------------------+
</pre>
</div></div>

<p>and components:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>mysql&gt; select * from component where id in (
    select SINK_NODE_ID from nodeassociation where ASSOCIATION_TYPE='IssueComponent' and SOURCE_NODE_ID=(
        select id from jiraissue where pkey='JRA-5351')
    );
+-------+---------+---------------+-------------+------+------+--------------+
| ID    | PROJECT | cname         | description | URL  | LEAD | ASSIGNEETYPE |
+-------+---------+---------------+-------------+------+------+--------------+
| 10126 |   10240 | Web interface | NULL        | NULL | NULL |         NULL |
+-------+---------+---------------+-------------+------+------+--------------+
</pre>
</div></div>

<h2><a name="DatabaseSchema-Issuelinks"></a>Issue links</h2>

<p><span class="image-wrap" style=""><img src="Database+Schema_files/issuelink.png" border="0"></span><br>
JIRA issue links are stored in the <tt>issuelink</tt> table, which simply links the IDs of two issues together, and records the link type:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>mysql&gt; desc issuelink;
+-------------+---------------+------+-----+---------+-------+
| Field       | Type          | Null | Key | Default | Extra |
+-------------+---------------+------+-----+---------+-------+
| ID          | decimal(18,0) | NO   | PRI |         |       | 
| LINKTYPE    | decimal(18,0) | YES  | MUL | NULL    |       | 
| SOURCE      | decimal(18,0) | YES  | MUL | NULL    |       | 
| DESTINATION | decimal(18,0) | YES  | MUL | NULL    |       | 
| SEQUENCE    | decimal(18,0) | YES  |     | NULL    |       | 
+-------------+---------------+------+-----+---------+-------+
5 rows in set (0.00 sec)
</pre>
</div></div>

<p>For instance, to list all links between TP-1 and TP-2:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-sql">mysql&gt; <span class="code-keyword">select</span> * <span class="code-keyword">from</span> issuelink <span class="code-keyword">where</span> SOURCE=(<span class="code-keyword">select</span> id <span class="code-keyword">from</span> jiraissue <span class="code-keyword">where</span> pkey='TP-1') and DESTINATION=(<span class="code-keyword">select</span> id <span class="code-keyword">from</span> jiraissue <span class="code-keyword">where</span> pkey='TP-2');
+-------+----------+--------+-------------+----------+
| ID    | LINKTYPE | SOURCE | DESTINATION | SEQUENCE |
+-------+----------+--------+-------------+----------+
| 10020 |    10000 |  10000 |       10010 |     NULL | 
+-------+----------+--------+-------------+----------+
1 row in set (0.00 sec)
</pre>
</div></div>

<p>Link types are defined in <tt>issuelinktype</tt>. This query prints all links in the system with their type:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-sql">mysql&gt; <span class="code-keyword">select</span> j1.pkey, issuelinktype.INWARD, j2.pkey <span class="code-keyword">from</span> jiraissue j1, issuelink, issuelinktype, jiraissue j2 <span class="code-keyword">where</span> j1.id=issuelink.SOURCE and j2.id=issuelink.DESTINATION and issuelinktype.id=issuelink.linktype;
+-------+---------------------+-------+
| pkey  | INWARD              | pkey  |
+-------+---------------------+-------+
| TP-4  | jira_subtask_inward | TP-5  | 
| TP-4  | jira_subtask_inward | TP-7  | 
| TP-4  | jira_subtask_inward | TP-8  | 
| TP-11 | jira_subtask_inward | TP-12 | 
| TP-4  | jira_subtask_inward | TP-6  | 
| TP-1  | is duplicated <span class="code-keyword">by</span>    | TP-2  | 
+-------+---------------------+-------+
6 rows in set (0.00 sec)
</pre>
</div></div>

<h3><a name="DatabaseSchema-Subtasks"></a>Subtasks</h3>

<p>As shown in the last query, JIRA records the issue-subtask relation
as a link. The "subtask" link type is hidden in the user interface
(indicated by the 'pstyle' value below), but visible in the database:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-sql">mysql&gt; <span class="code-keyword">select</span> * <span class="code-keyword">from</span> issuelinktype;
+-------+-------------------+---------------------+----------------------+--------------+
| ID    | LINKNAME          | INWARD              | OUTWARD              | pstyle       |
+-------+-------------------+---------------------+----------------------+--------------+
| 10000 | Duplicate         | is duplicated <span class="code-keyword">by</span>    | duplicates           | NULL         | 
| 10001 | jira_subtask_link | jira_subtask_inward | jira_subtask_outward | jira_subtask | 
+-------+-------------------+---------------------+----------------------+--------------+
2 rows in set (0.00 sec)
</pre>
</div></div>

<p>This means it is possible to convert an issue to a subtask, or vice-versa, by tweaking <tt>issuelink</tt> records.</p>


<p>Custom fields have their own set of tables. For details, see <a href="http://confluence.atlassian.com/display/JIRA/Custom+fields" title="Custom fields">Custom fields</a></p>
<p><br class="atl-forced-newline">
<br class="atl-forced-newline"></p>


<h1><a name="DatabaseSchema-Customfields"></a>Custom fields</h1>

<p>Custom fields defined in the system are stored in the <tt>customfield</tt> table, and instances of custom fields are stored in <tt>customfieldvalue</tt>:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>mysql&gt; desc customfieldvalue;
+-------------+---------------+------+-----+---------+-------+
| Field       | Type          | Null | Key | Default | Extra |
+-------------+---------------+------+-----+---------+-------+
| ID          | decimal(18,0) | NO   | PRI |         |       |
| ISSUE       | decimal(18,0) | YES  | MUL | NULL    |       |
| CUSTOMFIELD | decimal(18,0) | YES  |     | NULL    |       |
| PARENTKEY   | varchar(255)  | YES  |     | NULL    |       |
| STRINGVALUE | varchar(255)  | YES  |     | NULL    |       |
| NUMBERVALUE | decimal(18,6) | YES  |     | NULL    |       |
| TEXTVALUE   | longtext      | YES  |     | NULL    |       |
| DATEVALUE   | datetime      | YES  |     | NULL    |       |
| VALUETYPE   | varchar(255)  | YES  |     | NULL    |       |
+-------------+---------------+------+-----+---------+-------+
</pre>
</div></div>

<p>We can print all custom field values for an issue with:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>mysql&gt; select * from customfieldvalue where issue=(select id from jiraissue where pkey='JRA-5448');
+-------+-------+-------------+-----------+-------------+-------------+-----------+---------------------+-----------+
| ID    | ISSUE | CUSTOMFIELD | PARENTKEY | STRINGVALUE | NUMBERVALUE | TEXTVALUE | DATEVALUE           | VALUETYPE |
+-------+-------+-------------+-----------+-------------+-------------+-----------+---------------------+-----------+
| 23276 | 22160 |       10190 | NULL      | NULL        |        NULL | NULL      | 2004-12-07 17:25:58 | NULL      |
+-------+-------+-------------+-----------+-------------+-------------+-----------+---------------------+-----------+
</pre>
</div></div>

<p>and we can see what type of custom field this (10190) is with:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>mysql&gt; select * from customfield where id=10190;
+-------+------------------------------------------------+--------------------------------------------------------+-----------------+-------------+--------------+-----------+---------+-----------+
| ID    | CUSTOMFIELDTYPEKEY                             | CUSTOMFIELDSEARCHERKEY                                 | cfname          | DESCRIPTION | defaultvalue | FIELDTYPE | PROJECT | ISSUETYPE |
+-------+------------------------------------------------+--------------------------------------------------------+-----------------+-------------+--------------+-----------+---------+-----------+
| 10190 | com.atlassian.jira.ext.charting:resolutiondate | com.atlassian.jira.ext.charting:resolutiondatesearcher | Resolution Date | NULL        | NULL         |      NULL |    NULL | NULL      |
+-------+------------------------------------------------+--------------------------------------------------------+-----------------+-------------+--------------+-----------+---------+-----------+
</pre>
</div></div>

<p>(ie. it's a "Resolution Date").</p>

<p>This query identifies a particular custom field value in a particular issue:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>mysql&gt; select stringvalue from customfieldvalue where customfield=(select id from customfield where cfname='Urgency') and issue=(select id from jiraissue where pkey='FOR-845');
+-------------+
| stringvalue |
+-------------+
| Low         | 
+-------------+
1 row in set (0.33 sec)
</pre>
</div></div>

<p>If the custom field has multiple values (multi-select or multi-user picker), each issue can have multiple <tt>customfieldvalue</tt> rows:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>mysql&gt; select * from customfieldvalue where customfield=(select ID from customfield where cfname='MultiUser');
+-------+-------+-------------+-----------+-------------+-------------+-----------+-----------+-----------+
| ID    | ISSUE | CUSTOMFIELD | PARENTKEY | STRINGVALUE | NUMBERVALUE | TEXTVALUE | DATEVALUE | VALUETYPE |
+-------+-------+-------------+-----------+-------------+-------------+-----------+-----------+-----------+
| 10002 | 10060 |       10000 | NULL      | bob         |        NULL | NULL      | NULL      | NULL      | 
| 10003 | 10060 |       10000 | NULL      | jeff        |        NULL | NULL      | NULL      | NULL      | 
+-------+-------+-------------+-----------+-------------+-------------+-----------+-----------+-----------+
2 rows in set (0.00 sec)
</pre>
</div></div>

<p>Here issue 10060 has two users, <tt>bob</tt> and <tt>jeff</tt> in its MultiUser custom field.</p>


<h2><a name="DatabaseSchema-Customfieldconfigurationoptions"></a>Custom field configuration options</h2>

<p>The option sets (1, 2, 3 and A, B, C) are stored in the <b>customfieldoption</b> table:</p>

<p>mysql&gt; select * from customfieldoption where customfieldconfig=10031;</p>
<div class="table-wrap">
<table class="confluenceTable"><tbody>
<tr>
<th class="confluenceTh"> ID    </th>
<th class="confluenceTh"> CUSTOMFIELD </th>
<th class="confluenceTh"> CUSTOMFIELDCONFIG </th>
<th class="confluenceTh"> PARENTOPTIONID </th>
<th class="confluenceTh"> SEQUENCE </th>
<th class="confluenceTh"> customvalue </th>
<th class="confluenceTh"> optiontype </th>
</tr>
<tr>
<td class="confluenceTd"> 10000 </td>
<td class="confluenceTd">       10001 </td>
<td class="confluenceTd">             10031 </td>
<td class="confluenceTd">           NULL </td>
<td class="confluenceTd">        0 </td>
<td class="confluenceTd"> 1           </td>
<td class="confluenceTd"> NULL       </td>
</tr>
<tr>
<td class="confluenceTd"> 10001 </td>
<td class="confluenceTd">       10001 </td>
<td class="confluenceTd">             10031 </td>
<td class="confluenceTd">           NULL </td>
<td class="confluenceTd">        1 </td>
<td class="confluenceTd"> 2           </td>
<td class="confluenceTd"> NULL       </td>
</tr>
<tr>
<td class="confluenceTd"> 10002 </td>
<td class="confluenceTd">       10001 </td>
<td class="confluenceTd">             10031 </td>
<td class="confluenceTd">           NULL </td>
<td class="confluenceTd">        2 </td>
<td class="confluenceTd"> 3           </td>
<td class="confluenceTd"> NULL       </td>
</tr>
</tbody></table>
</div>



<p>mysql&gt; select * from customfieldoption where customfieldconfig=10032;</p>
<div class="table-wrap">
<table class="confluenceTable"><tbody>
<tr>
<th class="confluenceTh"> ID    </th>
<th class="confluenceTh"> CUSTOMFIELD </th>
<th class="confluenceTh"> CUSTOMFIELDCONFIG </th>
<th class="confluenceTh"> PARENTOPTIONID </th>
<th class="confluenceTh"> SEQUENCE </th>
<th class="confluenceTh"> customvalue </th>
<th class="confluenceTh"> optiontype </th>
</tr>
<tr>
<td class="confluenceTd"> 10003 </td>
<td class="confluenceTd">       10001 </td>
<td class="confluenceTd">             10032 </td>
<td class="confluenceTd">           NULL </td>
<td class="confluenceTd">        0 </td>
<td class="confluenceTd"> A           </td>
<td class="confluenceTd"> NULL       </td>
</tr>
<tr>
<td class="confluenceTd"> 10004 </td>
<td class="confluenceTd">       10001 </td>
<td class="confluenceTd">             10032 </td>
<td class="confluenceTd">           NULL </td>
<td class="confluenceTd">        1 </td>
<td class="confluenceTd"> B           </td>
<td class="confluenceTd"> NULL       </td>
</tr>
<tr>
<td class="confluenceTd"> 10005 </td>
<td class="confluenceTd">       10001 </td>
<td class="confluenceTd">             10032 </td>
<td class="confluenceTd">           NULL </td>
<td class="confluenceTd">        2 </td>
<td class="confluenceTd"> C           </td>
<td class="confluenceTd"> NULL       </td>
</tr>
</tbody></table>
</div>



<h2><a name="DatabaseSchema-Customfieldconfigurationdefaultvalue"></a>Custom field configuration default value</h2>

<p>The custom field default value is stored in the <b>genericconfiguration</b>
table. Since this table must store a value for any custom field type
(cascading selects, multi-selects, etc) the value is encoded as XML. </p>

<p>If we were to set a default value of "2" for our "Default Configuration Scheme for SelectCF", it would be recorded as:</p>

<p>mysql&gt; select * from genericconfiguration where ID=10031;</p>
<div class="table-wrap">
<table class="confluenceTable"><tbody>
<tr>
<th class="confluenceTh"> ID    </th>
<th class="confluenceTh"> DATATYPE     </th>
<th class="confluenceTh"> DATAKEY </th>
<th class="confluenceTh"> XMLVALUE           </th>
</tr>
<tr>
<td class="confluenceTd"> 10031 </td>
<td class="confluenceTd"> DefaultValue </td>
<td class="confluenceTd"> 10030   </td>
<td class="confluenceTd"> &lt;string&gt;2&lt;/string&gt; </td>
</tr>
</tbody></table>
</div>



<h2><a name="DatabaseSchema-Customfieldconfigurationschemes"></a>Custom field configuration schemes</h2>

<p>JIRA custom fields can have different default values and possible
values for each project and/or issue type. This is set up by clicking
'Configure' in the custom field definition.</p>

<p>For instance, in this screenshot the "SelectCF" select-list field
will have values 1, 2, 3 for all projects except bugs and improvements
in "NewProj" and"Test Project", which will have values A, B and C:</p>

<p><span class="image-wrap" style=""><img src="Database+Schema_files/cf_configschemes.png" border="0"></span></p>

<h2><a name="DatabaseSchema-Customfieldconfigurationscopes"></a>Custom field configuration scopes</h2>

<p>In the database, these custom field configuration schemes are stored in the <b>fieldconfigscheme</b> table</p>

<p>mysql&gt; select * from fieldconfigscheme where id in (10031,10032);</p>
<div class="table-wrap">
<table class="confluenceTable"><tbody>
<tr>
<th class="confluenceTh"> ID    </th>
<th class="confluenceTh"> configname                                </th>
<th class="confluenceTh"> DESCRIPTION                                    </th>
<th class="confluenceTh"> FIELDID           </th>
<th class="confluenceTh"> CUSTOMFIELD </th>
</tr>
<tr>
<td class="confluenceTd"> 10031 </td>
<td class="confluenceTd"> Default Configuration Scheme for SelectCF </td>
<td class="confluenceTd"> Default configuration scheme generated by JIRA </td>
<td class="confluenceTd"> customfield_10001 </td>
<td class="confluenceTd">        NULL </td>
</tr>
<tr>
<td class="confluenceTd"> 10032 </td>
<td class="confluenceTd"> NewProj scheme                            </td>
<td class="confluenceTd">&nbsp;</td>
<td class="confluenceTd"> customfield_10001 </td>
<td class="confluenceTd">        NULL </td>
</tr>
</tbody></table>
</div>



<p>The <b>projects in scope</b> for each of these schemes is listed as records (one per project) in the <b>configurationcontext</b> table:</p>

<p>mysql&gt; select * from configurationcontext where fieldconfigscheme=10031;</p>
<div class="table-wrap">
<table class="confluenceTable"><tbody>
<tr>
<th class="confluenceTh"> ID    </th>
<th class="confluenceTh"> PROJECTCATEGORY </th>
<th class="confluenceTh"> PROJECT </th>
<th class="confluenceTh"> customfield       </th>
<th class="confluenceTh"> FIELDCONFIGSCHEME </th>
</tr>
<tr>
<td class="confluenceTd"> 10053 </td>
<td class="confluenceTd">            NULL </td>
<td class="confluenceTd">    NULL </td>
<td class="confluenceTd"> customfield_10001 </td>
<td class="confluenceTd">             10031 </td>
</tr>
</tbody></table>
</div>

<p>(Here showing that that the "Default Configuration Scheme for SelectCF" applies to all projects)</p>

<p>mysql&gt; select * from configurationcontext where fieldconfigscheme=10032;</p>
<div class="table-wrap">
<table class="confluenceTable"><tbody>
<tr>
<th class="confluenceTh"> ID    </th>
<th class="confluenceTh"> PROJECTCATEGORY </th>
<th class="confluenceTh"> PROJECT </th>
<th class="confluenceTh"> customfield       </th>
<th class="confluenceTh"> FIELDCONFIGSCHEME </th>
</tr>
<tr>
<td class="confluenceTd"> 10054 </td>
<td class="confluenceTd">            NULL </td>
<td class="confluenceTd">   10000 </td>
<td class="confluenceTd"> customfield_10001 </td>
<td class="confluenceTd">             10032 </td>
</tr>
<tr>
<td class="confluenceTd"> 10055 </td>
<td class="confluenceTd">            NULL </td>
<td class="confluenceTd">   10010 </td>
<td class="confluenceTd"> customfield_10001 </td>
<td class="confluenceTd">             10032 </td>
</tr>
</tbody></table>
</div>



<p>(Here showing that "NewProj scheme" is restricted to projects with ids 10000 and 10010 ("Test Project" and "NewProj")).</p>

<p>Finally, the <b>issue types in scope</b> for each scheme is listed as records (one per issue type) in the <b>fieldconfigschemeissuetype</b> table:</p>

<p>mysql&gt; select * from fieldconfigschemeissuetype where fieldconfigscheme = 10031;</p>
<div class="table-wrap">
<table class="confluenceTable"><tbody>
<tr>
<th class="confluenceTh"> ID    </th>
<th class="confluenceTh"> ISSUETYPE </th>
<th class="confluenceTh"> FIELDCONFIGSCHEME </th>
<th class="confluenceTh"> FIELDCONFIGURATION </th>
</tr>
<tr>
<td class="confluenceTd"> 10051 </td>
<td class="confluenceTd"> NULL      </td>
<td class="confluenceTd">             10031 </td>
<td class="confluenceTd">              10031 </td>
</tr>
</tbody></table>
</div>



<p>(Here showing that "Default Configuration Scheme for SelectCF" is not limited to any issue types)</p>

<p>mysql&gt; select * from fieldconfigschemeissuetype where fieldconfigscheme = 10032;</p>
<div class="table-wrap">
<table class="confluenceTable"><tbody>
<tr>
<th class="confluenceTh"> ID    </th>
<th class="confluenceTh"> ISSUETYPE </th>
<th class="confluenceTh"> FIELDCONFIGSCHEME </th>
<th class="confluenceTh"> FIELDCONFIGURATION </th>
</tr>
<tr>
<td class="confluenceTd"> 10052 </td>
<td class="confluenceTd"> 1         </td>
<td class="confluenceTd">             10032 </td>
<td class="confluenceTd">              10032 </td>
</tr>
<tr>
<td class="confluenceTd"> 10053 </td>
<td class="confluenceTd"> 4         </td>
<td class="confluenceTd">             10032 </td>
<td class="confluenceTd">              10032 </td>
</tr>
</tbody></table>
</div>



<p>(Here showing that "Newproj scheme" is limited to issue types with IDs 1 and 4).</p>

<p>Note that there should <em>always be a record</em> in <tt>configurationcontext</tt> and <tt>fieldconfigschemeissuetype</tt> for each issue type configuration scheme. If the scheme isn't restricted to any projects or issue types, the <tt>project</tt> and <tt>issuetype</tt> columns of the respective tables should be <tt>NULL</tt>. Incidentally JIRA has/had a bug where it didn't leave an entry when deleting an issue type (<a href="http://jira.atlassian.com/browse/JRA-10461" class="external-link" rel="nofollow">JRA-10461</a>), so if you are making changes manually, don't make the same mistake.</p>
<p><br class="atl-forced-newline">
<br class="atl-forced-newline">
<br class="atl-forced-newline"></p>

<h1><a name="DatabaseSchema-ChangeHistory"></a>Change History</h1>

<p><br class="atl-forced-newline"></p>
<h3><a name="DatabaseSchema-ChangeHistoryDatabaseTables"></a>Change History Database Tables</h3>

<p>JIRA stores the Change History records of each issue in the <tt>changegroup</tt> and <tt>changeitem</tt> tables.</p>

<p>Each change to the issue triggered by a user inserts one record into the <tt>changegroup</tt>
table. Each changegroup table record describes which issue it refers
to, the time of the change and the user who has performed the change
(null for a non-logged in user).</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">mysql&gt; select * from changegroup;
+-------+---------+--------+---------------------+
| ID    | issueid | AUTHOR | CREATED             |
+-------+---------+--------+---------------------+
| 10000 |   10000 | admin  | 2005-06-09 15:16:39 |
| 10751 |   10000 | admin  | 2005-06-10 00:00:00 |
+-------+---------+--------+---------------------+
</pre>
</div></div>
<p>Each changegroup record refers to one or many <tt>changeitem</tt> records. Each <tt>changeitem</tt> record describes the issue field that has been updated and its old and new values. The <tt>OLDVALUE</tt> column records the id of the changed enity (e.g. status) while <tt>OLDSTRING</tt>
records the name fo the entity, so that if the entity is removed from
the system the change history for an issue can still be displayed. The <tt>NEWVALUE</tt> and <tt>NEWSTRING</tt> columns are similar in nature.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">mysql&gt; select * from changeitem;
+-------+---------+-----------+------------+----------+-----------+----------+-----------+
| ID    | groupid | FIELDTYPE | FIELD      | OLDVALUE | OLDSTRING | NEWVALUE | NEWSTRING |
+-------+---------+-----------+------------+----------+-----------+----------+-----------+
| 10000 |   10000 | jira      | status     | 1        | Open      | 6        | Closed    |
| 10001 |   10000 | jira      | resolution | NULL     | NULL      | 1        | Fixed     |
| 11404 |   10751 | jira      | status     | 1        | Open      | 6        | Closed    |
+-------+---------+-----------+------------+----------+-----------+----------+-----------+
</pre>
</div></div>

<h3><a name="DatabaseSchema-Insertingchangehistoryrecords"></a>Inserting change history records</h3>

<p>When writing tools that import data into JIRA, it is sometimes
required to import change history. To do this please first insert a
record into the <tt>changegroup</tt> table with a valid issue id:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">insert into changegroup values (20000,10000,'admin','2005-06-12');
</pre>
</div></div>
<p>The issues are stored in the <tt>jiraissue</tt> table:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">mysql&gt; select id, pkey from jiraissue;
+-------+-------+
| id    | pkey  |
+-------+-------+
| 10000 | TST-1 |
+-------+-------+
</pre>
</div></div>
<p>And then insert the required number of <tt>changeitem</tt> records referencing the inserted <tt>changegroup</tt> record:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">insert into changeitem values (11000, 20000, 'jira','status','1','Open','6','Closed');
</pre>
</div></div>

<p><a name="DatabaseSchema-sequencevalueitem"></a></p>
<h3><a name="DatabaseSchema-TheSEQUENCEVALUEITEMtable"></a>The SEQUENCE_VALUE_ITEM table</h3>

<p>The SEQUENCE_VALUE_ITEM table is used to record, in a database
independent way, the maximum ID used in each of JIRA's database tables:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">mysql&gt; select * from SEQUENCE_VALUE_ITEM;
+-----------------------------+--------+
| SEQ_NAME                    | SEQ_ID |
+-----------------------------+--------+
| Action                      |  10310 | 
| ChangeGroup                 |  11050 | 
| ChangeItem                  |  11320 | 
| ColumnLayout                |  10040 | 
| ColumnLayoutItem            |  10120 | 
| Component                   |  10110 | 
| ConfigurationContext        |  10170 | 
| SchemeIssueSecurities       |  10040 | 
...
</pre>
</div></div>

<p>Actually, Ofbiz allocates IDs in batches of 10, so the SEQ_ID is the
next available ID rounded up to the nearest 10. So you might have:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">mysql&gt; select max(ID) from jiraaction;
+---------+
| max(ID) |
+---------+
|   10303 | 
+---------+
1 row in set (0.04 sec)

mysql&gt; select * from SEQUENCE_VALUE_ITEM where SEQ_NAME='Action';
+----------+--------+
| SEQ_NAME | SEQ_ID |
+----------+--------+
| Action   |  10310 | 
+----------+--------+
1 row in set (0.01 sec)
</pre>
</div></div>

<p>Where 10310 is the nearest 10 above 10303.</p>

<p>The <tt>SEQ_NAME</tt> column refers to the database table name defined in <tt>WEB-INF/classes/entitydefs/entitymodel.xml</tt> (eg. "Action" is <tt>jiraaction</tt>).</p>

<h5><a name="DatabaseSchema-Manuallyinsertingrecords"></a>Manually inserting records</h5>

<p>The implication of this is that if you want to manually insert records into JIRA database tables, you <b>must update SEQUENCE_VALUE_ITEM yourself</b>.
Set the relevant rows' SEQ_ID values to a value greater than the actual
maximum ID in the table. You will then need to restart JIRA to ensure
all database caches are reset.</p>

<h3><a name="DatabaseSchema-RetrievingChangeHistoryusingJIRA'sAPI"></a>Retrieving Change History using JIRA's API</h3>

<p>The best way to retrieve change history entries is:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">actionManager.getChangeHistory(getIssue(), authenticationContext.getUser());
</pre>
</div></div>

<p>You can declare dependency on JiraAuthenticationContext and ActionManager in the constructor of your plugin as described in <a href="http://confluence.atlassian.com/display/JIRA/PicoContainer+and+JIRA" title="PicoContainer and JIRA">PicoContainer and JIRA</a>.</p>

<p>The getChangeHistory method returns <tt>ChangeHistory</tt> objects
on which you can call the getChangeItems() method. This returns a List
if GenericValue objects each one representing an issue field update. To
check the field that was updated do:</p>

<p>String fieldName = changeItem.getString("field")</p>

<p>GenericValues are described in <a href="http://confluence.atlassian.com/display/JIRA/Database+Schema" title="Database Schema">Database Schema</a>.</p>
<p><br class="atl-forced-newline">
<br class="atl-forced-newline">
<br class="atl-forced-newline">
<br class="atl-forced-newline">
<br class="atl-forced-newline"></p>

<h1><a name="DatabaseSchema-UsersandGroups"></a>Users and Groups</h1>

<p><br class="atl-forced-newline"></p>
<h3><a name="DatabaseSchema-UserandGroupTables"></a>User and Group Tables</h3>


<h4><a name="DatabaseSchema-UserTables"></a>User Tables</h4>

<p>JIRA uses an open source framework called <a href="http://www.opensymphony.com/osuser/" class="external-link" rel="nofollow">OSUser</a> to manage its users. The user records are stored in the <tt>userbase</tt> database table. The table holds little information:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">+---------------+---------------+------+-----+---------+-------+
| Field         | Type          | Null | Key | Default | Extra |
+---------------+---------------+------+-----+---------+-------+
| ID            | decimal(18,0) |      | PRI | 0       |       |
| username      | varchar(255)  | YES  | MUL | NULL    |       |
| PASSWORD_HASH | varchar(255)  | YES  |     | NULL    |       |
+---------------+---------------+------+-----+---------+-------+
</pre>
</div></div>
<p>OSUser also stores some properties for the user. The properties are: <em>full name</em> and <em>e-mail</em>. These properties are stored in the <tt>propertyentry</tt> and <tt>propertystring</tt> tables.</p>

<p>For each user the <tt>propertyentry</tt> table:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">+--------------+---------------+------+-----+---------+-------+
| Field        | Type          | Null | Key | Default | Extra |
+--------------+---------------+------+-----+---------+-------+
| ID           | decimal(18,0) |      | PRI | 0       |       |
| ENTITY_NAME  | varchar(255)  | YES  | MUL | NULL    |       |
| ENTITY_ID    | decimal(18,0) | YES  |     | NULL    |       |
| PROPERTY_KEY | varchar(255)  | YES  |     | NULL    |       |
| propertytype | decimal(9,0)  | YES  |     | NULL    |       |
+--------------+---------------+------+-----+---------+-------+
</pre>
</div></div>
<p>stores 'OSUser' in the ENTITY_NAME column, the id of the <tt>userbase</tt> record in the ENTITY_ID column, and 'fullName' or 'email' in the PROPERTY_KEY column.</p>

<p>The <tt>propertystring</tt> table:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">+---------------+---------------+------+-----+---------+-------+
| Field         | Type          | Null | Key | Default | Extra |
+---------------+---------------+------+-----+---------+-------+
| ID            | decimal(18,0) |      | PRI | 0       |       |
| propertyvalue | text          | YES  |     | NULL    |       |
+---------------+---------------+------+-----+---------+-------+
</pre>
</div></div>
<p>stores the actual values of the properties. The ID column is the same as the ID of the <tt>propertyentry</tt> record and the propertyvalue column would store the full name or e-mail of the user.</p>

<h4><a name="DatabaseSchema-GroupTables"></a>Group Tables</h4>

<p>The groups are stored in the <tt>groupbase</tt> table:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">+-----------+---------------+------+-----+---------+-------+
| Field     | Type          | Null | Key | Default | Extra |
+-----------+---------------+------+-----+---------+-------+
| ID        | decimal(18,0) |      | PRI | 0       |       |
| groupname | varchar(255)  | YES  | MUL | NULL    |       |
+-----------+---------------+------+-----+---------+-------+
</pre>
</div></div>

<h4><a name="DatabaseSchema-GroupMembership"></a>Group Membership</h4>

<p>The <tt>membershipbase</tt> table records which users belong to which groups:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">+------------+---------------+------+-----+---------+-------+
| Field      | Type          | Null | Key | Default | Extra |
+------------+---------------+------+-----+---------+-------+
| ID         | decimal(18,0) |      | PRI | 0       |       |
| USER_NAME  | varchar(255)  | YES  | MUL | NULL    |       |
| GROUP_NAME | varchar(255)  | YES  | MUL | NULL    |       |
+------------+---------------+------+-----+---------+-------+
</pre>
</div></div>
<p>The USER_NAME column is set to the username column in the <tt>userbase</tt> table. The GROUP_NAME is set to the groupname record in the <tt>groupbase</tt> table.</p>

<h4><a name="DatabaseSchema-WatchesandVotes"></a>Watches and Votes</h4>

<p>Watches and votes are recorded in the userassociation table:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">+------------------+---------------+------+-----+---------+-------+
| Field            | Type          | Null | Key | Default | Extra |
+------------------+---------------+------+-----+---------+-------+
| SOURCE_NAME      | varchar(60)   | NO   | PRI |         |       | 
| SINK_NODE_ID     | decimal(18,0) | NO   | PRI |         |       | 
| SINK_NODE_ENTITY | varchar(60)   | NO   | PRI |         |       | 
| ASSOCIATION_TYPE | varchar(60)   | NO   | PRI |         |       | 
| SEQUENCE         | decimal(9,0)  | YES  |     | NULL    |       | 
+------------------+---------------+------+-----+---------+-------+
</pre>
</div></div>

<p>For example:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">mysql&gt; select * from userassociation;
+---------------+--------------+------------------+------------------+----------+
| SOURCE_NAME   | SINK_NODE_ID | SINK_NODE_ENTITY | ASSOCIATION_TYPE | SEQUENCE |
+---------------+--------------+------------------+------------------+----------+
| asmith        |     108433   | Issue            | WatchIssue       |     NULL | 
| droberts      |     100915   | Issue            | WatchIssue       |     NULL | 
| dfernandez    |     106387   | Issue            | VoteIssue        |     NULL | 
...
</pre>
</div></div>

<p>For example, here user 'asmith' is watching issue with id 108433.</p>
<p><br class="atl-forced-newline">
<br class="atl-forced-newline">
<br class="atl-forced-newline">
<br class="atl-forced-newline">
<br class="atl-forced-newline"></p>

<h1><a name="DatabaseSchema-Issuestatusandworkflow"></a>Issue status and workflow</h1>

<p><br class="atl-forced-newline"></p>
<p>This page describes the database tables involved in <a href="http://confluence.atlassian.com/display/JIRA/Configuring+Workflow" title="Configuring Workflow">issue workflow</a>. It will be useful for people who wish to insert issues into the database manually, or diagnose/fix corrupted databases.<br>
JIRA issues have both:</p>

<ul class="alternate" type="square">
	<li>a <b>status</b> (Open, Closed, In Progress etc).</li>
	<li>a <b>workflow step</b>, which governs which transitions are available</li>
</ul>


<p><span class="image-wrap" style=""><img src="Database+Schema_files/issuestatus.png" border="0"></span></p>


<h1><a name="DatabaseSchema-Issuestatus"></a>Issue status</h1>

<p>In the database, the <b>status</b> (Open, Closed etc) is stored on the <tt>jiraissue</tt> table:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">mysql&gt; select issuestatus from jiraissue where pkey='TP-1';
+-------------+
| issuestatus |
+-------------+
| 1           |
+-------------+
1 row in set (0.00 sec)

mysql&gt; select pname from issuestatus, jiraissue where issuestatus.id=jiraissue.issuestatus and pkey='TP-1';
+-------+
| pname |
+-------+
| Open  |
+-------+
1 row in set (0.00 sec)
</pre>
</div></div>
<h1><a name="DatabaseSchema-Issueworkflowstep"></a>Issue workflow step</h1>

<p>Originally JIRA issues only had a status. Then in version 2.0, <em>workflow</em>
was added, so that transitions between statuses could be customized. An
issue's workflow step is stored in new tables, referenced from <tt>jiraissue</tt> by the <tt>workflow_id</tt>:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">mysql&gt; select * from OS_WFENTRY where ID=(select workflow_id from jiraissue where pkey='TP-1');
+-------+------+-------------+-------+
| ID    | NAME | INITIALIZED | STATE |
+-------+------+-------------+-------+
| 10000 | jira | 0           | 1     |
+-------+------+-------------+-------+
1 row in set (0.02 sec)
</pre>
</div></div>
<p>The TP-1 issue's OS_WFENTRY row indicates that the issue uses the 'jira' (default, built-in) workflow.</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">mysql&gt; select * from OS_CURRENTSTEP where ENTRY_ID=(select workflow_id from jiraissue where pkey='TP-1');
+-------+----------+---------+-----------+-------+---------------------+----------+-------------+--------+--------+
| ID    | ENTRY_ID | STEP_ID | ACTION_ID | OWNER | START_DATE          | DUE_DATE | FINISH_DATE | STATUS | CALLER |
+-------+----------+---------+-----------+-------+---------------------+----------+-------------+--------+--------+
| 10000 | 10000    | 1       | 0         |       | 2003-11-24 15:17:50 |          |             | Open   |        |
+-------+----------+---------+-----------+-------+---------------------+----------+-------------+--------+--------+
1 row in set (0.13 sec)
</pre>
</div></div>
<p>The issue's OS_CURRENTSTEP row specifies the issue's <em>current step</em>. The only field really used is <tt>STEP_ID</tt>. This references a step definition in the workflow:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml"><span class="code-tag">&lt;step id=<span class="code-quote">"1"</span> name=<span class="code-quote">"Open"</span>&gt;</span></pre>
</div></div>
<div class="panelMacro"><table class="noteMacro"><colgroup><col width="24"><col></colgroup><tbody><tr><td valign="top"><img src="Database+Schema_files/warning.gif" alt="" align="absmiddle" border="0" width="16" height="16"></td><td>The workflow definition for the built-in 'jira' workflow can be seen in <tt>atlassian-jira/WEB-INF/classes/jira-workflow.xml</tt></td></tr></tbody></table></div>

<h1><a name="DatabaseSchema-Howstatusandsteprelate"></a>How status and step relate</h1>

<p>An issue's status and workflow step are kept in synch:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">mysql&gt; select issuestatus.pname status, issuestatus, OS_CURRENTSTEP.STEP_ID, OS_CURRENTSTEP.STATUS from
   issuestatus, jiraissue, OS_CURRENTSTEP where
   issuestatus.id=jiraissue.issuestatus and jiraissue.workflow_id=OS_CURRENTSTEP.ENTRY_ID;
+-------------+-------------+---------+----------+
| status      | issuestatus | STEP_ID | STATUS   |
+-------------+-------------+---------+----------+
| Open        | 1           | 1       | Open     |
| Open        | 1           | 1       | Open     |
| Open        | 1           | 1       | Open     |
| Open        | 1           | 1       | Open     |
| Open        | 1           | 1       | Open     |
| Open        | 1           | 1       | Open     |
...
| Open        | 1           | 1       | Open     |
| Open        | 1           | 1       | Open     |
| Open        | 1           | 1       | Open     |
| In Progress | 3           | 3       | Underway |
| Closed      | 6           | 6       | Closed   |
+-------------+-------------+---------+----------+
32 rows in set (0.00 sec)

mysql&gt;
</pre>
</div></div>
<p>Status and step are kept in synch is with a <a href="http://confluence.atlassian.com/display/JIRA/Configuring+Workflow#ConfiguringWorkflow-postfunctions">workflow post-function</a> (UpdateIssueStatusFunction), which updates the status whenever the step changes.</p>

<p>If the step gets out of synch with the status, then incorrect (or
no) workflow operations appear on the issue page. Eg. if
OS_CURRENTSTEP.STEP_ID was 6 ("Closed") when jiraissue.issuestatus was
1 ("Open"), then the issue would have only one transition ("Reopen
issue") which would break if anyone clicked on it.</p>

<h1><a name="DatabaseSchema-Summary"></a>Summary</h1>

<ul class="alternate" type="square">
	<li>For each <tt>jiraissue</tt> row, there is a <tt>OS_CURRENTSTEP</tt> and <tt>OS_WFENTRY</tt> row.</li>
	<li><tt>OS_WFENTRY</tt> specifies the applicable workflow. <tt>OS_CURRENTSTEP</tt> specifies the step in that workflow.</li>
	<li>The relations are:
	<ul class="alternate" type="square">
		<li>jiraissue.WORKFLOW_ID == OS_WFENTRY.ID</li>
		<li>jiraissue.WORKFLOW_ID == OS_CURRENTSTEP.ENTRY_ID</li>
	</ul>
	</li>
</ul>

<p><br class="atl-forced-newline">
<br class="atl-forced-newline">
<br class="atl-forced-newline">
<br class="atl-forced-newline">
<br class="atl-forced-newline"></p>

<h2><a name="DatabaseSchema-ExampleSQLs"></a>Example SQLs</h2>

<p>Some examples of SQLs that can be run against the JIRA schema:<br>
<a href="http://confluence.atlassian.com/display/JIRA/Example+SQL+queries+for+JIRA" title="Example SQL queries for JIRA">Example SQL queries for JIRA</a></p>
</div>
</td>
</tr>
</tbody></table>

        <!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:dc="http://purl.org/dc/elements/1.1/"
         xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
         <rdf:Description
    rdf:about="http://confluence.atlassian.com/display/JIRA/Database+Schema"
    dc:identifier="http://confluence.atlassian.com/display/JIRA/Database+Schema"
    dc:title="Database Schema"
    trackback:ping="http://confluence.atlassian.com/rpc/trackback/122037"/>
</rdf:RDF>
-->

            
    
    
    


<fieldset class="hidden parameters">
    <legend>Labels parameters</legend>
    <input id="editLabel" value="Edit" type="hidden">
    <input id="addLabel" value="Add Labels" type="hidden">
    <input id="domainName" value="http://confluence.atlassian.com" type="hidden">
    <input id="pageId" value="122037" type="hidden">
    <input id="spaceKey" value="JIRA" type="hidden">
</fieldset>

<div id="labels-section" class="pageSection">
    <div id="default-labels-header" class="section-header">
        <h2 id="labels-section-title" class="section-title">Labels</h2>
            </div>

    <div class="labels-editor">
        <div id="labelsList">
            <div id="label-220" class="confluence-label">
    <a class="label" rel="nofollow" href="http://confluence.atlassian.com/label/JIRA/database">database</a>    <span class="remove-label-caption">database</span>
    <a class="remove-label" href="#">Delete</a>
</div>
<div id="label-2150" class="confluence-label">
    <a class="label" rel="nofollow" href="http://confluence.atlassian.com/label/JIRA/sql">sql</a>    <span class="remove-label-caption">sql</span>
    <a class="remove-label" href="#">Delete</a>
</div>
        </div>

        <span class="errorMessage error" id="errorSpan"></span>
        <form method="get" action="" id="add-labels-form">
            <div id="labelInputSpan" class="labels-input">
                <div id="labelOperationErrorContainer" class="hidden">
                    <span class="error"><span class="errorMessage" id="labelOperationErrorMessage"></span></span>
                </div>

                <div class="caption">Enter labels to add to this page:</div>

                <input autocomplete="off" id="labelsString" name="labelsString" value="" size="40">
                <input class="add-labels" value="Add" type="submit">
                <input class="hide-labels-editor" value="Done" type="submit">
                <div id="waitImageAndStatus">
                    <img class="waiting" alt="Please wait" src="Database+Schema_files/wait.gif">&nbsp;
                    <span id="labelOperationStatus" class="smalltext"></span>
                </div>
                <div style="display: none;" class="auto_complete" id="labelsAutocompleteList"></div>
                <div class="labels-tip">
                    <div id="suggestedLabelsSpan"></div>
                    Looking for a label? Just start typing.
                </div>
            </div>
        </form>
    </div>
</div>

                    <div id="children-section" class="pageSection">
        
        <div class="section-header">
            <h2 id="children-section-title" class="section-title">
                <a name="children">Children (7)</a>
            </h2>
            <span class="noprint">
                &nbsp;
                                    <a id="hide-children-link" class="grey" href="http://confluence.atlassian.com/display/JIRA/Database+Schema?showChildren=false#children">Hide Children</a>
                
                &nbsp;|&nbsp; <a class="grey" href="http://confluence.atlassian.com/pages/listpages-dirview.action?key=JIRA&amp;openId=122037#selectedPageInHierarchy">View in Hierarchy</a>
                            </span>
        </div>
                    <div id="page-children" class="pageSectionBody">
                                                     <img src="Database+Schema_files/docs_16.gif" title="Change History" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/Change+History">Change History</a>
                             <br>
                                                     <img src="Database+Schema_files/docs_16.gif" title="Configuration properties" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/Configuration+properties">Configuration properties</a>
                             <br>
                                                     <img src="Database+Schema_files/docs_16.gif" title="Custom fields" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/Custom+fields">Custom fields</a>
                             <br>
                                                     <img src="Database+Schema_files/docs_16.gif" title="Example SQL queries for JIRA" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/Example+SQL+queries+for+JIRA">Example SQL queries for JIRA</a>
                             <br>
                                                     <img src="Database+Schema_files/docs_16.gif" title="Issue fields" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/Issue+fields">Issue fields</a>
                             <br>
                                                     <img src="Database+Schema_files/docs_16.gif" title="Issue status and workflow" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/Issue+status+and+workflow">Issue status and workflow</a>
                             <br>
                                                     <img src="Database+Schema_files/docs_16.gif" title="User and Group Tables" align="absmiddle" border="0" width="16" height="16">
                         <a href="http://confluence.atlassian.com/display/JIRA/User+and+Group+Tables">User and Group Tables</a>
                             <br>
                            </div>
                </div>
    
            

<!--
    Root decorator: this is a layer of abstraction that Confluence doesn't need. It will be removed eventually.
-->




    
        
    
    


<fieldset class="parameters hidden">
    <input id="deleteCommentConfirmMessage" value="Are you sure you want to remove the comment?" type="hidden">
    <input id="collapseTooltip" value="Click to toggle the display of this comment." type="hidden">
</fieldset>





<div id="comments-section" class="pageSection">
    
    
    
    
                                    <p class="noprint">
                <a href="http://confluence.atlassian.com/display/JIRA/Database+Schema?showComments=true&amp;showCommentArea=true#addcomment" id="add-comment-bottom" accesskey="m">Add Comment</a>
            </p>
                        </div>



<div align="center">
                                        <p><br class="atl-forced-newline">
<a href="http://creativecommons.org/licenses/by/2.5/au/" class="external-link" rel="nofollow"><span class="image-wrap" style=""><img src="Database+Schema_files/CCBy-88x31.png" border="0"></span></a> Except where otherwise noted, content in this space is licensed under a <a href="http://creativecommons.org/licenses/by/2.5/au/" class="external-link" rel="nofollow">Creative Commons Attribution 2.5 Australia License</a>. </p>
                        </div>

            
</div>
    <br class="clear">
</div>


<div id="footer">
                    <ul id="poweredby">
        <li class="noprint">Powered by <a href="http://www.atlassian.com/software/confluence" class="smalltext">Atlassian Confluence</a> 3.0.1-rc5, the <a href="http://www.atlassian.com/software/confluence" class="smalltext">Enterprise Wiki</a>.</li>
        <li class="print-only">Printed by Atlassian Confluence 3.0.1-rc5, the Enterprise Wiki.</li>
        <li class="noprint"><a href="http://jira.atlassian.com/secure/BrowseProject.jspa?id=10470" class="smalltext">Bug/feature request</a> –</li>
        <li class="noprint"><a href="http://www.atlassian.com/about/connected.jsp?s_kwcid=Confluence-stayintouch" class="smalltext">Atlassian news</a> –</li>
        <li class="noprint"><a href="http://confluence.atlassian.com/administrators.action">Contact administrators</a></li>
    </ul>
</div>

<!-- Google Analytics start -->

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="Database+Schema_files/ga.js" type="text/javascript"></script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-6032469-8");
pageTracker._setDomainName(".atlassian.com");
pageTracker._setCookieTimeout("31526000"); // 1 year
pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);

// use the original referral -- http://www.roirevolution.com/blog/2009/05/tracking_transactions_back_to_the_initial_referrer_with_google_analytics.html
if(document.cookie.match("(^|;\\s)__utma=")) {
    pageTracker._setReferrerOverride("");
    pageTracker._setCampNameKey("zzz");
    pageTracker._setCampMediumKey("zzz");
    pageTracker._setCampSourceKey("zzz");
    pageTracker._setCampTermKey("zzz");
    pageTracker._setCampContentKey("zzz");
    pageTracker._setCampCIdKey("zzz");
}

pageTracker._trackPageview();
} catch(err) {}</script>

<!-- Google Analytics end -->
<div style="display: none;" id="current-user-status-holder" class="current-user-latest-status"></div><div style="display: none;" id="content-hover-shadow"><div class="tl"></div><div class="tr"></div><div class="l"></div><div class="r"></div><div class="bl"></div><div class="br"></div><div class="b"></div></div><div id="content-hover-0" class="ajs-content-hover"><div style="width: 300px;" class="contents"></div></div><div id="content-hover-1" class="ajs-content-hover"><div style="width: 300px;" class="contents"></div></div></body></html>